import Vue from 'vue'
import App from './App.vue'
import uView from 'uview-ui'
import store from '@/store'
import * as utils from '@/utils/index'
import * as auth from '@/utils/auth'
import * as message from '@/utils/message'
import * as tools from '@/utils/tools'
import { handleEvn } from '@/utils/h5/handleEvn'
import config from '@/config/index'
import utils2 from '@/utils/newIndex'
import filters from '@/utils/filters'
import request from '@/request' //导入api以及网络请求方法

config.NODE_ENV === 'production' ? (console.log = () => null) : ''
Vue.prototype.$utils = utils
Vue.prototype.$auth = auth
Vue.prototype.$msg = message
Vue.prototype.$tools = tools
Vue.use(uView)
Vue.use(request)
Vue.use(utils2)
Vue.use(filters) // 全局过滤器
Vue.config.productionTip = false // 关闭生产信息提示信息
Vue.config.silent = true // 开启vue日志和警告
//#ifdef H5
import { router, RouterMount } from './router'
import VConsole from 'vconsole'
if (config.NODE_ENV !== 'production') {
  const vc: any = new VConsole()
  Vue.use(vc)
}
Vue.use(router)
handleEvn(() => {
  const app = new App({
    store
  })
  RouterMount(app, router, '#app')
})
//#endif

//#ifndef H5
new App({
  store
}).$mount()
//#endif
